home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / clones < prev    next >
Text File  |  2001-06-18  |  2KB  |  44 lines

  1. SYNOPSIS
  2.         object* clones ()
  3.         object* clones (int what)
  4.         object* clones (string|object obj [, int what])
  5.  
  6. DESCRIPTION
  7.         The efuns returns an array with all clones of a certain blueprint.
  8.         The array is subject to the usual runtime limits.
  9.  
  10.         If <obj> is given, all clones of the blueprint of <obj> (which
  11.         may be <obj> itself) are returned, otherwise all clones of the
  12.         current object resp. of the current object's blueprint. If <obj>
  13.         is given as string, it must name an existing object.
  14.  
  15.         <what> selects how to treat clones made from earlier versions
  16.         of the blueprint:
  17.           == 0: (default) return the clones of the current blueprint only.
  18.           == 1: return the clones of the previous blueprints only.
  19.           == 2: return all clones of the blueprint.
  20.  
  21.         Note: this efun is computationally expensive.
  22.  
  23.         If the driver is compiled with DYNAMIC_COSTS, the cost of this
  24.         efun is proportional to the number of objects in the game.
  25.  
  26. EXAMPLE
  27.         object o, p;
  28.         o = clone_object("/std/thing"); /* or "std/thing" in COMPAT_MODE */
  29.         destruct(find_object("/std/thing"));
  30.         p = clone_object("/std/thing");
  31.  
  32.         clones("/std/thing")    --> returns ({ p })
  33.         clones("/std/thing", 0) --> returns ({ p })
  34.         clones("/std/thing", 1) --> returns ({ o })
  35.         clones("/std/thing", 2) --> returns ({ o, p })
  36.  
  37. HISTORY
  38.         Introduced in LDMud 3.2.8.
  39.         LDMud 3.2.9 added the dynamic cost.
  40.  
  41. SEE ALSO
  42.         clone_object(E), clonep(E)
  43.  
  44.